﻿<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
  
  <head>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-39155502-5"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
  
      gtag('config', 'UA-39155502-5');
    </script>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Class Many&lt;TChild&gt;
   | MongoDB.Entities </title>
    <meta name="viewport" content="width=device-width">
    <meta name="title" content="Class Many&lt;TChild&gt;
   | MongoDB.Entities ">
    <meta name="generator" content="docfx 2.58.0.0">
    <meta name="description" content="A data access library for MongoDB with an elegant api, LINQ support and built-in entity relationship management.">
    <link rel="shortcut icon" href="../images/favicon.ico">
    <link rel="stylesheet" href="../styles/docfx.vendor.css">
    <link rel="stylesheet" href="../styles/docfx.css">
    <link rel="stylesheet" href="../styles/main.css">
    <meta property="docfx:navrel" content="../toc.html">
    <meta property="docfx:tocrel" content="toc.html">
    
    <meta property="docfx:rel" content="../">
    <meta property="docfx:newtab" content="true">
    <meta property="og:title" content="MongoDB.Entities">
    <meta property="og:site_name" content="MongoDB.Entities">
    <meta property="og:url" content="https://mongodb-entities.com">
    <meta property="og:description" content="A data access library for MongoDB with an elegant api, LINQ support and built-in entity relationship management,">
    <meta property="og:type" content="website">
    <meta property="og:image" content="https://mongodb-entities.com/images/social-square.png">  
  </head>
  <body data-spy="scroll" data-target="#affix" data-offset="120">
    <div id="wrapper">
      <header>
        
        <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
          <div class="container">
            <div class="navbar-header">
              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
              </button>
              
              <a class="navbar-brand" href="../index.html">
                <img id="logo" class="svg" src="../images/icon.png" alt="">
              </a>
            </div>
            <div class="collapse navbar-collapse" id="navbar">
              <form class="navbar-form navbar-right" role="search" id="search">
                <div class="form-group">
                  <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
                </div>
              </form>
            </div>
          </div>
        </nav>
        
        <div class="subnav navbar navbar-default">
          <div class="container hide-when-search" id="breadcrumb">
            <ul class="breadcrumb">
              <li></li>
            </ul>
          </div>
        </div>
      </header>
      <div class="container body-content">
        
        <div id="search-results">
          <div class="search-list">Search Results for <span></span></div>
          <div class="sr-items">
            <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
          </div>
          <ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
        </div>
      </div>
      <div role="main" class="container body-content hide-when-search">
        
        <div class="sidenav hide-when-search">
          <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
          <div class="sidetoggle collapse" id="sidetoggle">
            <div id="sidetoc"></div>
          </div>
        </div>
        <div class="article row grid-right">
          <div class="col-md-10">
            <article class="content wrap" id="_content" data-uid="MongoDB.Entities.Many`1">
  
  
  <h1 id="MongoDB_Entities_Many_1" data-uid="MongoDB.Entities.Many`1" class="text-break">Class Many&lt;TChild&gt;
  </h1>
  <div class="markdown level0 summary"><p>Represents a one-to-many/many-to-many relationship between two Entities.</p>
<p>WARNING: You have to initialize all instances of this class before accessing any of it&apos;s members.</p>
<p>Initialize from the constructor of the parent entity as follows:</p>
<p><code>this.InitOneToMany(() => Property);</code></p>
<p><code>this.InitManyToMany(() => Property, x => x.OtherProperty);</code></p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><span class="xref">System.Object</span></div>
    <div class="level1"><a class="xref" href="MongoDB.Entities.ManyBase.html">ManyBase</a></div>
    <div class="level2"><span class="xref">Many&lt;TChild&gt;</span></div>
  </div>
  <div classs="implements">
    <h5>Implements</h5>
    <div><span class="xref">System.Collections.Generic.IEnumerable</span>&lt;TChild&gt;</div>
    <div><span class="xref">System.Collections.IEnumerable</span></div>
  </div>
  <div class="inheritedMembers">
    <h5>Inherited Members</h5>
    <div>
      <span class="xref">System.Object.Equals(System.Object)</span>
    </div>
    <div>
      <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
    </div>
    <div>
      <span class="xref">System.Object.GetHashCode()</span>
    </div>
    <div>
      <span class="xref">System.Object.GetType()</span>
    </div>
    <div>
      <span class="xref">System.Object.MemberwiseClone()</span>
    </div>
    <div>
      <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
    </div>
    <div>
      <span class="xref">System.Object.ToString()</span>
    </div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="MongoDB.Entities.html">MongoDB.Entities</a></h6>
  <h6><strong>Assembly</strong>: MongoDB.Entities.dll</h6>
  <h5 id="MongoDB_Entities_Many_1_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public sealed class Many&lt;TChild&gt; : ManyBase, IEnumerable&lt;TChild&gt;, IEnumerable where TChild : IEntity</code></pre>
  </div>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">TChild</span></td>
        <td><p>Type of the child IEntity.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="constructors">Constructors
  </h3>
  
  
  <a id="MongoDB_Entities_Many_1__ctor_" data-uid="MongoDB.Entities.Many`1.#ctor*"></a>
  <h4 id="MongoDB_Entities_Many_1__ctor" data-uid="MongoDB.Entities.Many`1.#ctor">Many()</h4>
  <div class="markdown level1 summary"><p>Creates an instance of Many&lt;TChild&gt;
This is only needed in VB.Net</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public Many()</code></pre>
  </div>
  <h3 id="properties">Properties
  </h3>
  
  
  <a id="MongoDB_Entities_Many_1_JoinCollection_" data-uid="MongoDB.Entities.Many`1.JoinCollection*"></a>
  <h4 id="MongoDB_Entities_Many_1_JoinCollection" data-uid="MongoDB.Entities.Many`1.JoinCollection">JoinCollection</h4>
  <div class="markdown level1 summary"><p>Gets the IMongoCollection of JoinRecords for this relationship.</p>
<p>TIP: Try never to use this unless really neccessary.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public IMongoCollection&lt;JoinRecord&gt; JoinCollection { get; }</code></pre>
  </div>
  <h5 class="propertyValue">Property Value</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">MongoDB.Driver.IMongoCollection</span>&lt;<a class="xref" href="MongoDB.Entities.JoinRecord.html">JoinRecord</a>&gt;</td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
  </h3>
  
  
  <a id="MongoDB_Entities_Many_1_AddAsync_" data-uid="MongoDB.Entities.Many`1.AddAsync*"></a>
  <h4 id="MongoDB_Entities_Many_1_AddAsync__0_MongoDB_Driver_IClientSessionHandle_System_Threading_CancellationToken_" data-uid="MongoDB.Entities.Many`1.AddAsync(`0,MongoDB.Driver.IClientSessionHandle,System.Threading.CancellationToken)">AddAsync(TChild, IClientSessionHandle, CancellationToken)</h4>
  <div class="markdown level1 summary"><p>Adds a new child reference.</p>
<p>WARNING: Make sure to save the parent and child Entities before calling this method.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public Task AddAsync(TChild child, IClientSessionHandle session = null, CancellationToken cancellation = default(CancellationToken))</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">TChild</span></td>
        <td><span class="parametername">child</span></td>
        <td><p>The child Entity to add.</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">MongoDB.Driver.IClientSessionHandle</span></td>
        <td><span class="parametername">session</span></td>
        <td><p>An optional session if using within a transaction</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">System.Threading.CancellationToken</span></td>
        <td><span class="parametername">cancellation</span></td>
        <td><p>An optional cancellation token</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Threading.Tasks.Task</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  
  
  <a id="MongoDB_Entities_Many_1_AddAsync_" data-uid="MongoDB.Entities.Many`1.AddAsync*"></a>
  <h4 id="MongoDB_Entities_Many_1_AddAsync_System_Collections_Generic_IEnumerable__0__MongoDB_Driver_IClientSessionHandle_System_Threading_CancellationToken_" data-uid="MongoDB.Entities.Many`1.AddAsync(System.Collections.Generic.IEnumerable{`0},MongoDB.Driver.IClientSessionHandle,System.Threading.CancellationToken)">AddAsync(IEnumerable&lt;TChild&gt;, IClientSessionHandle, CancellationToken)</h4>
  <div class="markdown level1 summary"><p>Adds multiple child references in a single bulk operation</p>
<p>WARNING: Make sure to save the parent and child Entities before calling this method.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public Task AddAsync(IEnumerable&lt;TChild&gt; children, IClientSessionHandle session = null, CancellationToken cancellation = default(CancellationToken))</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Collections.Generic.IEnumerable</span>&lt;TChild&gt;</td>
        <td><span class="parametername">children</span></td>
        <td><p>The child Entities to add</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">MongoDB.Driver.IClientSessionHandle</span></td>
        <td><span class="parametername">session</span></td>
        <td><p>An optional session if using within a transaction</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">System.Threading.CancellationToken</span></td>
        <td><span class="parametername">cancellation</span></td>
        <td><p>An optional cancellation token</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Threading.Tasks.Task</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  
  
  <a id="MongoDB_Entities_Many_1_AddAsync_" data-uid="MongoDB.Entities.Many`1.AddAsync*"></a>
  <h4 id="MongoDB_Entities_Many_1_AddAsync_System_Collections_Generic_IEnumerable_System_String__MongoDB_Driver_IClientSessionHandle_System_Threading_CancellationToken_" data-uid="MongoDB.Entities.Many`1.AddAsync(System.Collections.Generic.IEnumerable{System.String},MongoDB.Driver.IClientSessionHandle,System.Threading.CancellationToken)">AddAsync(IEnumerable&lt;String&gt;, IClientSessionHandle, CancellationToken)</h4>
  <div class="markdown level1 summary"><p>Adds multiple child references in a single bulk operation</p>
<p>WARNING: Make sure to save the parent and child Entities before calling this method.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public Task AddAsync(IEnumerable&lt;string&gt; childIDs, IClientSessionHandle session = null, CancellationToken cancellation = default(CancellationToken))</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Collections.Generic.IEnumerable</span>&lt;<span class="xref">System.String</span>&gt;</td>
        <td><span class="parametername">childIDs</span></td>
        <td><p>The IDs of the child Entities to add.</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">MongoDB.Driver.IClientSessionHandle</span></td>
        <td><span class="parametername">session</span></td>
        <td><p>An optional session if using within a transaction</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">System.Threading.CancellationToken</span></td>
        <td><span class="parametername">cancellation</span></td>
        <td><p>An optional cancellation token</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Threading.Tasks.Task</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  
  
  <a id="MongoDB_Entities_Many_1_AddAsync_" data-uid="MongoDB.Entities.Many`1.AddAsync*"></a>
  <h4 id="MongoDB_Entities_Many_1_AddAsync_System_String_MongoDB_Driver_IClientSessionHandle_System_Threading_CancellationToken_" data-uid="MongoDB.Entities.Many`1.AddAsync(System.String,MongoDB.Driver.IClientSessionHandle,System.Threading.CancellationToken)">AddAsync(String, IClientSessionHandle, CancellationToken)</h4>
  <div class="markdown level1 summary"><p>Adds a new child reference.</p>
<p>WARNING: Make sure to save the parent and child Entities before calling this method.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public Task AddAsync(string childID, IClientSessionHandle session = null, CancellationToken cancellation = default(CancellationToken))</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.String</span></td>
        <td><span class="parametername">childID</span></td>
        <td><p>The ID of the child Entity to add.</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">MongoDB.Driver.IClientSessionHandle</span></td>
        <td><span class="parametername">session</span></td>
        <td><p>An optional session if using within a transaction</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">System.Threading.CancellationToken</span></td>
        <td><span class="parametername">cancellation</span></td>
        <td><p>An optional cancellation token</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Threading.Tasks.Task</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  
  
  <a id="MongoDB_Entities_Many_1_ChildrenCountAsync_" data-uid="MongoDB.Entities.Many`1.ChildrenCountAsync*"></a>
  <h4 id="MongoDB_Entities_Many_1_ChildrenCountAsync_MongoDB_Driver_IClientSessionHandle_MongoDB_Driver_CountOptions_System_Threading_CancellationToken_" data-uid="MongoDB.Entities.Many`1.ChildrenCountAsync(MongoDB.Driver.IClientSessionHandle,MongoDB.Driver.CountOptions,System.Threading.CancellationToken)">ChildrenCountAsync(IClientSessionHandle, CountOptions, CancellationToken)</h4>
  <div class="markdown level1 summary"><p>Get the number of children for a relationship</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public Task&lt;long&gt; ChildrenCountAsync(IClientSessionHandle session = null, CountOptions options = null, CancellationToken cancellation = default(CancellationToken))</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">MongoDB.Driver.IClientSessionHandle</span></td>
        <td><span class="parametername">session</span></td>
        <td><p>An optional session if using within a transaction</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">MongoDB.Driver.CountOptions</span></td>
        <td><span class="parametername">options</span></td>
        <td><p>An optional AggregateOptions object</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">System.Threading.CancellationToken</span></td>
        <td><span class="parametername">cancellation</span></td>
        <td><p>An optional cancellation token</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Threading.Tasks.Task</span>&lt;<span class="xref">System.Int64</span>&gt;</td>
        <td></td>
      </tr>
    </tbody>
  </table>
  
  
  <a id="MongoDB_Entities_Many_1_ChildrenFluent_" data-uid="MongoDB.Entities.Many`1.ChildrenFluent*"></a>
  <h4 id="MongoDB_Entities_Many_1_ChildrenFluent_MongoDB_Driver_IClientSessionHandle_MongoDB_Driver_AggregateOptions_" data-uid="MongoDB.Entities.Many`1.ChildrenFluent(MongoDB.Driver.IClientSessionHandle,MongoDB.Driver.AggregateOptions)">ChildrenFluent(IClientSessionHandle, AggregateOptions)</h4>
  <div class="markdown level1 summary"><p>An IAggregateFluent of child Entities for the parent.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public IAggregateFluent&lt;TChild&gt; ChildrenFluent(IClientSessionHandle session = null, AggregateOptions options = null)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">MongoDB.Driver.IClientSessionHandle</span></td>
        <td><span class="parametername">session</span></td>
        <td><p>An optional session if using within a transaction</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">MongoDB.Driver.AggregateOptions</span></td>
        <td><span class="parametername">options</span></td>
        <td><p>An optional AggregateOptions object</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">MongoDB.Driver.IAggregateFluent</span>&lt;TChild&gt;</td>
        <td></td>
      </tr>
    </tbody>
  </table>
  
  
  <a id="MongoDB_Entities_Many_1_ChildrenQueryable_" data-uid="MongoDB.Entities.Many`1.ChildrenQueryable*"></a>
  <h4 id="MongoDB_Entities_Many_1_ChildrenQueryable_MongoDB_Driver_IClientSessionHandle_MongoDB_Driver_AggregateOptions_" data-uid="MongoDB.Entities.Many`1.ChildrenQueryable(MongoDB.Driver.IClientSessionHandle,MongoDB.Driver.AggregateOptions)">ChildrenQueryable(IClientSessionHandle, AggregateOptions)</h4>
  <div class="markdown level1 summary"><p>An IQueryable of child Entities for the parent.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public IMongoQueryable&lt;TChild&gt; ChildrenQueryable(IClientSessionHandle session = null, AggregateOptions options = null)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">MongoDB.Driver.IClientSessionHandle</span></td>
        <td><span class="parametername">session</span></td>
        <td><p>An optional session if using within a transaction</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">MongoDB.Driver.AggregateOptions</span></td>
        <td><span class="parametername">options</span></td>
        <td><p>An optional AggregateOptions object</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">MongoDB.Driver.Linq.IMongoQueryable</span>&lt;TChild&gt;</td>
        <td></td>
      </tr>
    </tbody>
  </table>
  
  
  <a id="MongoDB_Entities_Many_1_GetEnumerator_" data-uid="MongoDB.Entities.Many`1.GetEnumerator*"></a>
  <h4 id="MongoDB_Entities_Many_1_GetEnumerator" data-uid="MongoDB.Entities.Many`1.GetEnumerator">GetEnumerator()</h4>
  <div class="markdown level1 summary"></div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public IEnumerator&lt;TChild&gt; GetEnumerator()</code></pre>
  </div>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Collections.Generic.IEnumerator</span>&lt;TChild&gt;</td>
        <td></td>
      </tr>
    </tbody>
  </table>
  
  
  <a id="MongoDB_Entities_Many_1_JoinFluent_" data-uid="MongoDB.Entities.Many`1.JoinFluent*"></a>
  <h4 id="MongoDB_Entities_Many_1_JoinFluent_MongoDB_Driver_IClientSessionHandle_MongoDB_Driver_AggregateOptions_" data-uid="MongoDB.Entities.Many`1.JoinFluent(MongoDB.Driver.IClientSessionHandle,MongoDB.Driver.AggregateOptions)">JoinFluent(IClientSessionHandle, AggregateOptions)</h4>
  <div class="markdown level1 summary"><p>An IAggregateFluent of JoinRecords for this relationship</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public IAggregateFluent&lt;JoinRecord&gt; JoinFluent(IClientSessionHandle session = null, AggregateOptions options = null)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">MongoDB.Driver.IClientSessionHandle</span></td>
        <td><span class="parametername">session</span></td>
        <td><p>An optional session if using within a transaction</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">MongoDB.Driver.AggregateOptions</span></td>
        <td><span class="parametername">options</span></td>
        <td><p>An optional AggregateOptions object</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">MongoDB.Driver.IAggregateFluent</span>&lt;<a class="xref" href="MongoDB.Entities.JoinRecord.html">JoinRecord</a>&gt;</td>
        <td></td>
      </tr>
    </tbody>
  </table>
  
  
  <a id="MongoDB_Entities_Many_1_JoinQueryable_" data-uid="MongoDB.Entities.Many`1.JoinQueryable*"></a>
  <h4 id="MongoDB_Entities_Many_1_JoinQueryable_MongoDB_Driver_IClientSessionHandle_MongoDB_Driver_AggregateOptions_" data-uid="MongoDB.Entities.Many`1.JoinQueryable(MongoDB.Driver.IClientSessionHandle,MongoDB.Driver.AggregateOptions)">JoinQueryable(IClientSessionHandle, AggregateOptions)</h4>
  <div class="markdown level1 summary"><p>An IQueryable of JoinRecords for this relationship</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public IMongoQueryable&lt;JoinRecord&gt; JoinQueryable(IClientSessionHandle session = null, AggregateOptions options = null)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">MongoDB.Driver.IClientSessionHandle</span></td>
        <td><span class="parametername">session</span></td>
        <td><p>An optional session if using within a transaction</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">MongoDB.Driver.AggregateOptions</span></td>
        <td><span class="parametername">options</span></td>
        <td><p>An optional AggregateOptions object</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">MongoDB.Driver.Linq.IMongoQueryable</span>&lt;<a class="xref" href="MongoDB.Entities.JoinRecord.html">JoinRecord</a>&gt;</td>
        <td></td>
      </tr>
    </tbody>
  </table>
  
  
  <a id="MongoDB_Entities_Many_1_ParentsFluent_" data-uid="MongoDB.Entities.Many`1.ParentsFluent*"></a>
  <h4 id="MongoDB_Entities_Many_1_ParentsFluent__1_MongoDB_Driver_IAggregateFluent__0__" data-uid="MongoDB.Entities.Many`1.ParentsFluent``1(MongoDB.Driver.IAggregateFluent{`0})">ParentsFluent&lt;TParent&gt;(IAggregateFluent&lt;TChild&gt;)</h4>
  <div class="markdown level1 summary"><p>Get an IAggregateFluent of parents matching a supplied IAggregateFluent of children for this relationship.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public IAggregateFluent&lt;TParent&gt; ParentsFluent&lt;TParent&gt;(IAggregateFluent&lt;TChild&gt; children)

    where TParent : IEntity</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">MongoDB.Driver.IAggregateFluent</span>&lt;TChild&gt;</td>
        <td><span class="parametername">children</span></td>
        <td><p>An IAggregateFluent of children</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">MongoDB.Driver.IAggregateFluent</span>&lt;TParent&gt;</td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">TParent</span></td>
        <td><p>The type of the parent IEntity</p>
</td>
      </tr>
    </tbody>
  </table>
  
  
  <a id="MongoDB_Entities_Many_1_ParentsFluent_" data-uid="MongoDB.Entities.Many`1.ParentsFluent*"></a>
  <h4 id="MongoDB_Entities_Many_1_ParentsFluent__1_System_Collections_Generic_IEnumerable_System_String__MongoDB_Driver_IClientSessionHandle_MongoDB_Driver_AggregateOptions_" data-uid="MongoDB.Entities.Many`1.ParentsFluent``1(System.Collections.Generic.IEnumerable{System.String},MongoDB.Driver.IClientSessionHandle,MongoDB.Driver.AggregateOptions)">ParentsFluent&lt;TParent&gt;(IEnumerable&lt;String&gt;, IClientSessionHandle, AggregateOptions)</h4>
  <div class="markdown level1 summary"><p>Get an IAggregateFluent of parents matching multiple child IDs for this relationship.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public IAggregateFluent&lt;TParent&gt; ParentsFluent&lt;TParent&gt;(IEnumerable&lt;string&gt; childIDs, IClientSessionHandle session = null, AggregateOptions options = null)

    where TParent : IEntity</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Collections.Generic.IEnumerable</span>&lt;<span class="xref">System.String</span>&gt;</td>
        <td><span class="parametername">childIDs</span></td>
        <td><p>An IEnumerable of child IDs</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">MongoDB.Driver.IClientSessionHandle</span></td>
        <td><span class="parametername">session</span></td>
        <td><p>An optional session if using within a transaction</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">MongoDB.Driver.AggregateOptions</span></td>
        <td><span class="parametername">options</span></td>
        <td><p>An optional AggregateOptions object</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">MongoDB.Driver.IAggregateFluent</span>&lt;TParent&gt;</td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">TParent</span></td>
        <td><p>The type of the parent IEntity</p>
</td>
      </tr>
    </tbody>
  </table>
  
  
  <a id="MongoDB_Entities_Many_1_ParentsFluent_" data-uid="MongoDB.Entities.Many`1.ParentsFluent*"></a>
  <h4 id="MongoDB_Entities_Many_1_ParentsFluent__1_System_String_MongoDB_Driver_IClientSessionHandle_MongoDB_Driver_AggregateOptions_" data-uid="MongoDB.Entities.Many`1.ParentsFluent``1(System.String,MongoDB.Driver.IClientSessionHandle,MongoDB.Driver.AggregateOptions)">ParentsFluent&lt;TParent&gt;(String, IClientSessionHandle, AggregateOptions)</h4>
  <div class="markdown level1 summary"><p>Get an IAggregateFluent of parents matching a single child ID for this relationship.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public IAggregateFluent&lt;TParent&gt; ParentsFluent&lt;TParent&gt;(string childID, IClientSessionHandle session = null, AggregateOptions options = null)

    where TParent : IEntity</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.String</span></td>
        <td><span class="parametername">childID</span></td>
        <td><p>An child ID</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">MongoDB.Driver.IClientSessionHandle</span></td>
        <td><span class="parametername">session</span></td>
        <td><p>An optional session if using within a transaction</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">MongoDB.Driver.AggregateOptions</span></td>
        <td><span class="parametername">options</span></td>
        <td><p>An optional AggregateOptions object</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">MongoDB.Driver.IAggregateFluent</span>&lt;TParent&gt;</td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">TParent</span></td>
        <td><p>The type of the parent IEntity</p>
</td>
      </tr>
    </tbody>
  </table>
  
  
  <a id="MongoDB_Entities_Many_1_ParentsQueryable_" data-uid="MongoDB.Entities.Many`1.ParentsQueryable*"></a>
  <h4 id="MongoDB_Entities_Many_1_ParentsQueryable__1_MongoDB_Driver_Linq_IMongoQueryable__0__MongoDB_Driver_IClientSessionHandle_MongoDB_Driver_AggregateOptions_" data-uid="MongoDB.Entities.Many`1.ParentsQueryable``1(MongoDB.Driver.Linq.IMongoQueryable{`0},MongoDB.Driver.IClientSessionHandle,MongoDB.Driver.AggregateOptions)">ParentsQueryable&lt;TParent&gt;(IMongoQueryable&lt;TChild&gt;, IClientSessionHandle, AggregateOptions)</h4>
  <div class="markdown level1 summary"><p>Get an IQueryable of parents matching a supplied IQueryable of children for this relationship.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public IMongoQueryable&lt;TParent&gt; ParentsQueryable&lt;TParent&gt;(IMongoQueryable&lt;TChild&gt; children, IClientSessionHandle session = null, AggregateOptions options = null)

    where TParent : IEntity</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">MongoDB.Driver.Linq.IMongoQueryable</span>&lt;TChild&gt;</td>
        <td><span class="parametername">children</span></td>
        <td><p>An IQueryable of children</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">MongoDB.Driver.IClientSessionHandle</span></td>
        <td><span class="parametername">session</span></td>
        <td><p>An optional session if using within a transaction</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">MongoDB.Driver.AggregateOptions</span></td>
        <td><span class="parametername">options</span></td>
        <td><p>An optional AggregateOptions object</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">MongoDB.Driver.Linq.IMongoQueryable</span>&lt;TParent&gt;</td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">TParent</span></td>
        <td><p>The type of the parent IEntity</p>
</td>
      </tr>
    </tbody>
  </table>
  
  
  <a id="MongoDB_Entities_Many_1_ParentsQueryable_" data-uid="MongoDB.Entities.Many`1.ParentsQueryable*"></a>
  <h4 id="MongoDB_Entities_Many_1_ParentsQueryable__1_System_Collections_Generic_IEnumerable_System_String__MongoDB_Driver_IClientSessionHandle_MongoDB_Driver_AggregateOptions_" data-uid="MongoDB.Entities.Many`1.ParentsQueryable``1(System.Collections.Generic.IEnumerable{System.String},MongoDB.Driver.IClientSessionHandle,MongoDB.Driver.AggregateOptions)">ParentsQueryable&lt;TParent&gt;(IEnumerable&lt;String&gt;, IClientSessionHandle, AggregateOptions)</h4>
  <div class="markdown level1 summary"><p>Get an IQueryable of parents matching multiple child IDs for this relationship.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public IMongoQueryable&lt;TParent&gt; ParentsQueryable&lt;TParent&gt;(IEnumerable&lt;string&gt; childIDs, IClientSessionHandle session = null, AggregateOptions options = null)

    where TParent : IEntity</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Collections.Generic.IEnumerable</span>&lt;<span class="xref">System.String</span>&gt;</td>
        <td><span class="parametername">childIDs</span></td>
        <td><p>An IEnumerable of child IDs</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">MongoDB.Driver.IClientSessionHandle</span></td>
        <td><span class="parametername">session</span></td>
        <td><p>An optional session if using within a transaction</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">MongoDB.Driver.AggregateOptions</span></td>
        <td><span class="parametername">options</span></td>
        <td><p>An optional AggregateOptions object</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">MongoDB.Driver.Linq.IMongoQueryable</span>&lt;TParent&gt;</td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">TParent</span></td>
        <td><p>The type of the parent IEntity</p>
</td>
      </tr>
    </tbody>
  </table>
  
  
  <a id="MongoDB_Entities_Many_1_ParentsQueryable_" data-uid="MongoDB.Entities.Many`1.ParentsQueryable*"></a>
  <h4 id="MongoDB_Entities_Many_1_ParentsQueryable__1_System_String_MongoDB_Driver_IClientSessionHandle_MongoDB_Driver_AggregateOptions_" data-uid="MongoDB.Entities.Many`1.ParentsQueryable``1(System.String,MongoDB.Driver.IClientSessionHandle,MongoDB.Driver.AggregateOptions)">ParentsQueryable&lt;TParent&gt;(String, IClientSessionHandle, AggregateOptions)</h4>
  <div class="markdown level1 summary"><p>Get an IQueryable of parents matching a single child ID for this relationship.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public IMongoQueryable&lt;TParent&gt; ParentsQueryable&lt;TParent&gt;(string childID, IClientSessionHandle session = null, AggregateOptions options = null)

    where TParent : IEntity</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.String</span></td>
        <td><span class="parametername">childID</span></td>
        <td><p>A child ID</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">MongoDB.Driver.IClientSessionHandle</span></td>
        <td><span class="parametername">session</span></td>
        <td><p>An optional session if using within a transaction</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">MongoDB.Driver.AggregateOptions</span></td>
        <td><span class="parametername">options</span></td>
        <td><p>An optional AggregateOptions object</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">MongoDB.Driver.Linq.IMongoQueryable</span>&lt;TParent&gt;</td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">TParent</span></td>
        <td><p>The type of the parent IEntity</p>
</td>
      </tr>
    </tbody>
  </table>
  
  
  <a id="MongoDB_Entities_Many_1_RemoveAsync_" data-uid="MongoDB.Entities.Many`1.RemoveAsync*"></a>
  <h4 id="MongoDB_Entities_Many_1_RemoveAsync__0_MongoDB_Driver_IClientSessionHandle_System_Threading_CancellationToken_" data-uid="MongoDB.Entities.Many`1.RemoveAsync(`0,MongoDB.Driver.IClientSessionHandle,System.Threading.CancellationToken)">RemoveAsync(TChild, IClientSessionHandle, CancellationToken)</h4>
  <div class="markdown level1 summary"><p>Removes a child reference.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public Task RemoveAsync(TChild child, IClientSessionHandle session = null, CancellationToken cancellation = default(CancellationToken))</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">TChild</span></td>
        <td><span class="parametername">child</span></td>
        <td><p>The child IEntity to remove the reference of.</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">MongoDB.Driver.IClientSessionHandle</span></td>
        <td><span class="parametername">session</span></td>
        <td><p>An optional session if using within a transaction</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">System.Threading.CancellationToken</span></td>
        <td><span class="parametername">cancellation</span></td>
        <td><p>An optional cancellation token</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Threading.Tasks.Task</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  
  
  <a id="MongoDB_Entities_Many_1_RemoveAsync_" data-uid="MongoDB.Entities.Many`1.RemoveAsync*"></a>
  <h4 id="MongoDB_Entities_Many_1_RemoveAsync_System_Collections_Generic_IEnumerable__0__MongoDB_Driver_IClientSessionHandle_System_Threading_CancellationToken_" data-uid="MongoDB.Entities.Many`1.RemoveAsync(System.Collections.Generic.IEnumerable{`0},MongoDB.Driver.IClientSessionHandle,System.Threading.CancellationToken)">RemoveAsync(IEnumerable&lt;TChild&gt;, IClientSessionHandle, CancellationToken)</h4>
  <div class="markdown level1 summary"><p>Removes child references.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public Task RemoveAsync(IEnumerable&lt;TChild&gt; children, IClientSessionHandle session = null, CancellationToken cancellation = default(CancellationToken))</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Collections.Generic.IEnumerable</span>&lt;TChild&gt;</td>
        <td><span class="parametername">children</span></td>
        <td><p>The child Entities to remove the references of.</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">MongoDB.Driver.IClientSessionHandle</span></td>
        <td><span class="parametername">session</span></td>
        <td><p>An optional session if using within a transaction</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">System.Threading.CancellationToken</span></td>
        <td><span class="parametername">cancellation</span></td>
        <td><p>An optional cancellation token</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Threading.Tasks.Task</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  
  
  <a id="MongoDB_Entities_Many_1_RemoveAsync_" data-uid="MongoDB.Entities.Many`1.RemoveAsync*"></a>
  <h4 id="MongoDB_Entities_Many_1_RemoveAsync_System_Collections_Generic_IEnumerable_System_String__MongoDB_Driver_IClientSessionHandle_System_Threading_CancellationToken_" data-uid="MongoDB.Entities.Many`1.RemoveAsync(System.Collections.Generic.IEnumerable{System.String},MongoDB.Driver.IClientSessionHandle,System.Threading.CancellationToken)">RemoveAsync(IEnumerable&lt;String&gt;, IClientSessionHandle, CancellationToken)</h4>
  <div class="markdown level1 summary"><p>Removes child references.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public Task RemoveAsync(IEnumerable&lt;string&gt; childIDs, IClientSessionHandle session = null, CancellationToken cancellation = default(CancellationToken))</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Collections.Generic.IEnumerable</span>&lt;<span class="xref">System.String</span>&gt;</td>
        <td><span class="parametername">childIDs</span></td>
        <td><p>The IDs of the child Entities to remove the references of</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">MongoDB.Driver.IClientSessionHandle</span></td>
        <td><span class="parametername">session</span></td>
        <td><p>An optional session if using within a transaction</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">System.Threading.CancellationToken</span></td>
        <td><span class="parametername">cancellation</span></td>
        <td><p>An optional cancellation token</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Threading.Tasks.Task</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  
  
  <a id="MongoDB_Entities_Many_1_RemoveAsync_" data-uid="MongoDB.Entities.Many`1.RemoveAsync*"></a>
  <h4 id="MongoDB_Entities_Many_1_RemoveAsync_System_String_MongoDB_Driver_IClientSessionHandle_System_Threading_CancellationToken_" data-uid="MongoDB.Entities.Many`1.RemoveAsync(System.String,MongoDB.Driver.IClientSessionHandle,System.Threading.CancellationToken)">RemoveAsync(String, IClientSessionHandle, CancellationToken)</h4>
  <div class="markdown level1 summary"><p>Removes a child reference.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public Task RemoveAsync(string childID, IClientSessionHandle session = null, CancellationToken cancellation = default(CancellationToken))</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.String</span></td>
        <td><span class="parametername">childID</span></td>
        <td><p>The ID of the child Entity to remove the reference of.</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">MongoDB.Driver.IClientSessionHandle</span></td>
        <td><span class="parametername">session</span></td>
        <td><p>An optional session if using within a transaction</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">System.Threading.CancellationToken</span></td>
        <td><span class="parametername">cancellation</span></td>
        <td><p>An optional cancellation token</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Threading.Tasks.Task</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  
  
  <a id="MongoDB_Entities_Many_1_VB_InitManyToMany_" data-uid="MongoDB.Entities.Many`1.VB_InitManyToMany*"></a>
  <h4 id="MongoDB_Entities_Many_1_VB_InitManyToMany__1___0_System_Linq_Expressions_Expression_System_Func___0_System_Object___System_Linq_Expressions_Expression_System_Func__0_System_Object___System_Boolean_" data-uid="MongoDB.Entities.Many`1.VB_InitManyToMany``1(``0,System.Linq.Expressions.Expression{System.Func{``0,System.Object}},System.Linq.Expressions.Expression{System.Func{`0,System.Object}},System.Boolean)">VB_InitManyToMany&lt;TParent&gt;(TParent, Expression&lt;Func&lt;TParent, Object&gt;&gt;, Expression&lt;Func&lt;TChild, Object&gt;&gt;, Boolean)</h4>
  <div class="markdown level1 summary"><p>Use this method to initialize the Many&lt;TChild&gt; properties with VB.Net</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public void VB_InitManyToMany&lt;TParent&gt;(TParent parent, Expression&lt;Func&lt;TParent, object&gt;&gt; propertyParent, Expression&lt;Func&lt;TChild, object&gt;&gt; propertyChild, bool isInverse)

    where TParent : IEntity</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">TParent</span></td>
        <td><span class="parametername">parent</span></td>
        <td><p>The parent entity instance</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">System.Linq.Expressions.Expression</span>&lt;<span class="xref">System.Func</span>&lt;TParent, <span class="xref">System.Object</span>&gt;&gt;</td>
        <td><span class="parametername">propertyParent</span></td>
        <td><p>Function(x) x.ParentProp</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">System.Linq.Expressions.Expression</span>&lt;<span class="xref">System.Func</span>&lt;TChild, <span class="xref">System.Object</span>&gt;&gt;</td>
        <td><span class="parametername">propertyChild</span></td>
        <td><p>Function(x) x.ChildProp</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">System.Boolean</span></td>
        <td><span class="parametername">isInverse</span></td>
        <td><p>Specify if this is the inverse side of the relationship or not</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">TParent</span></td>
        <td><p>The type of the parent</p>
</td>
      </tr>
    </tbody>
  </table>
  
  
  <a id="MongoDB_Entities_Many_1_VB_InitOneToMany_" data-uid="MongoDB.Entities.Many`1.VB_InitOneToMany*"></a>
  <h4 id="MongoDB_Entities_Many_1_VB_InitOneToMany__1___0_System_Linq_Expressions_Expression_System_Func___0_System_Object___" data-uid="MongoDB.Entities.Many`1.VB_InitOneToMany``1(``0,System.Linq.Expressions.Expression{System.Func{``0,System.Object}})">VB_InitOneToMany&lt;TParent&gt;(TParent, Expression&lt;Func&lt;TParent, Object&gt;&gt;)</h4>
  <div class="markdown level1 summary"><p>Use this method to initialize the Many&lt;TChild&gt; properties with VB.Net</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public void VB_InitOneToMany&lt;TParent&gt;(TParent parent, Expression&lt;Func&lt;TParent, object&gt;&gt; property)

    where TParent : IEntity</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">TParent</span></td>
        <td><span class="parametername">parent</span></td>
        <td><p>The parent entity instance</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">System.Linq.Expressions.Expression</span>&lt;<span class="xref">System.Func</span>&lt;TParent, <span class="xref">System.Object</span>&gt;&gt;</td>
        <td><span class="parametername">property</span></td>
        <td><p>Function(x) x.PropName</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">TParent</span></td>
        <td><p>The type of the parent</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="eii">Explicit Interface Implementations
  </h3>
  
  
  <a id="MongoDB_Entities_Many_1_System_Collections_IEnumerable_GetEnumerator_" data-uid="MongoDB.Entities.Many`1.System#Collections#IEnumerable#GetEnumerator*"></a>
  <h4 id="MongoDB_Entities_Many_1_System_Collections_IEnumerable_GetEnumerator" data-uid="MongoDB.Entities.Many`1.System#Collections#IEnumerable#GetEnumerator">IEnumerable.GetEnumerator()</h4>
  <div class="markdown level1 summary"></div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">IEnumerator IEnumerable.GetEnumerator()</code></pre>
  </div>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Collections.IEnumerator</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h3 id="implements">Implements</h3>
  <div>
      <span class="xref">System.Collections.Generic.IEnumerable&lt;T&gt;</span>
  </div>
  <div>
      <span class="xref">System.Collections.IEnumerable</span>
  </div>
  <h3 id="extensionmethods">Extension Methods</h3>
  <div>
      <a class="xref" href="MongoDB.Entities.Extensions.html#MongoDB_Entities_Extensions_ToBatches__1_System_Collections_Generic_IEnumerable___0__System_Int32_">Extensions.ToBatches&lt;T&gt;(IEnumerable&lt;T&gt;, Int32)</a>
  </div>
  <div>
      <a class="xref" href="MongoDB.Entities.Extensions.html#MongoDB_Entities_Extensions_ToDocuments__1_System_Collections_Generic_IEnumerable___0__">Extensions.ToDocuments&lt;T&gt;(IEnumerable&lt;T&gt;)</a>
  </div>
  <div>
      <a class="xref" href="MongoDB.Entities.Extensions.html#MongoDB_Entities_Extensions_SaveAsync__1_System_Collections_Generic_IEnumerable___0__MongoDB_Driver_IClientSessionHandle_System_Threading_CancellationToken_">Extensions.SaveAsync&lt;T&gt;(IEnumerable&lt;T&gt;, IClientSessionHandle, CancellationToken)</a>
  </div>
  <div>
      <a class="xref" href="MongoDB.Entities.Extensions.html#MongoDB_Entities_Extensions_InsertAsync__1_System_Collections_Generic_IEnumerable___0__MongoDB_Driver_IClientSessionHandle_System_Threading_CancellationToken_">Extensions.InsertAsync&lt;T&gt;(IEnumerable&lt;T&gt;, IClientSessionHandle, CancellationToken)</a>
  </div>
  <div>
      <a class="xref" href="MongoDB.Entities.Extensions.html#MongoDB_Entities_Extensions_SaveOnlyAsync__1_System_Collections_Generic_IEnumerable___0__System_Linq_Expressions_Expression_System_Func___0_System_Object___MongoDB_Driver_IClientSessionHandle_System_Threading_CancellationToken_">Extensions.SaveOnlyAsync&lt;T&gt;(IEnumerable&lt;T&gt;, Expression&lt;Func&lt;T, Object&gt;&gt;, IClientSessionHandle, CancellationToken)</a>
  </div>
  <div>
      <a class="xref" href="MongoDB.Entities.Extensions.html#MongoDB_Entities_Extensions_SaveExceptAsync__1_System_Collections_Generic_IEnumerable___0__System_Linq_Expressions_Expression_System_Func___0_System_Object___MongoDB_Driver_IClientSessionHandle_System_Threading_CancellationToken_">Extensions.SaveExceptAsync&lt;T&gt;(IEnumerable&lt;T&gt;, Expression&lt;Func&lt;T, Object&gt;&gt;, IClientSessionHandle, CancellationToken)</a>
  </div>
  <div>
      <a class="xref" href="MongoDB.Entities.Extensions.html#MongoDB_Entities_Extensions_DeleteAllAsync__1_System_Collections_Generic_IEnumerable___0__MongoDB_Driver_IClientSessionHandle_System_Threading_CancellationToken_">Extensions.DeleteAllAsync&lt;T&gt;(IEnumerable&lt;T&gt;, IClientSessionHandle, CancellationToken)</a>
  </div>
  <div>
      <a class="xref" href="MongoDB.Entities.Extensions.html#MongoDB_Entities_Extensions_SortByRelevance__1_System_Collections_Generic_IEnumerable___0__System_String_System_Func___0_System_String__System_Nullable_System_Int32__">Extensions.SortByRelevance&lt;T&gt;(IEnumerable&lt;T&gt;, String, Func&lt;T, String&gt;, Nullable&lt;Int32&gt;)</a>
  </div>
</article>
          </div>
          
          <div class="hidden-sm col-md-2" role="complementary">
            <div class="sideaffix">
              <div class="contribution">
                <ul class="nav">
                </ul>
              </div>
              <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
                <h5>In This Article</h5>
                <div></div>
              </nav>
            </div>
          </div>
        </div>
      </div>
      
      <footer>
        <div class="grad-bottom"></div>
        <div class="footer">
          <div class="container">
            <span class="pull-right">
              <a href="#top">Back to top</a>
            </span>
            Developed by <a href='https://github.com/dj-nitehawk'>Đĵ ΝιΓΞΗΛψΚ</a> and <a href='https://github.com/dj-nitehawk/MongoDB.Entities/graphs/contributors'>contributors</a> / Licensed under <a href='https://github.com/dj-nitehawk/MongoDB.Entities/blob/master/LICENSE'>MIT</a> / Website generated by <a href='https://dotnet.github.io/docfx/'>DocFX</a>
            
          </div>
        </div>
      </footer>
    </div>
    
    <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
    <script type="text/javascript" src="../styles/docfx.js"></script>
    <script type="text/javascript" src="../styles/main.js"></script>
  </body>
</html>
